package de.tu_darmstadt.gdi1.battleship.view;

import de.tu_darmstadt.gdi1.battleship.controller.UserInteraction;
import de.tu_darmstadt.gdi1.battleship.model.BattleshipGame;
import de.tu_darmstadt.gdi1.battleship.ui.GamePanel;
import de.tu_darmstadt.gdi1.battleship.ui.GameWindow;

public class StudentWindow extends GameWindow {
	
	private BattleshipGame bsg;
	private UserInteraction controller;

	public StudentWindow(String windowTitle, BattleshipGame bsg) {
		super(windowTitle);
		this.bsg = bsg;
		createGamePanel();
		this.controller = new UserInteraction(bsg, this);
	}

	public BattleshipGame getBsg() {
		return bsg;
	}

	public UserInteraction getController() {
		return controller;
	}

	
	public void setController(UserInteraction controller) {
		this.controller = controller;
	}

	@Override
	protected GamePanel createGamePanel() {
		StudentPanel panel = new StudentPanel(this);
		panel.setGamePanelContents();
		add(panel);
		return panel;
	}

}
